package pc29;

import java.util.Scanner;

public class J03Tax {
	public static void main(String[] args) {

		int sal; //연봉
		int mar; // 결혼여부 0:미혼 1:기혼
		double tax; // 세금

		Scanner sc = new Scanner(System.in);

		System.out.println("결혼여부를 적으세요 0:미혼 / 1: 기혼");
		mar = sc.nextInt();

		System.out.println("연봉을 적으세요 : ");
		sal = sc.nextInt();
		sc.close();

		if (mar == 0) {
			if (sal >= 3000) {
				tax = sal * 0.05;
				System.out.println("세금 " + tax + "원");
			} 
			else {
				tax = sal * 0.10;
				System.out.println("세금 " + tax + "원");
			}
		}

		if (mar == 1) {
			if (sal >= 5000) {
				tax = sal * 0.15;
				System.out.println("세금 " + tax + "원");
			}
			else{
				tax = sal * 0.25;
				System.out.println("세금 " + tax + "원");
			}
		}
	}
}
